var mongoose = require('./db')

var Schema = mongoose.Schema

//标签表
var questionSchema = new Schema({
    title: String,
    answer:String,
    uploader:String,
    cate:{
        type:Schema.Types.ObjectId,
        ref:'cate'
    },
    status:{
        type:Number,
        default:0
    },
    reason:{
        type:String,
        default:"无"
    }
});

//创建model,第三个参数是实际表名
var questions = mongoose.model("questions", questionSchema,"questions");

module.exports = questions